docs/man: Fix/simplify generation of manpages
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 2 Jan 2019 10:26:49 +0000 (10:26 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 2 Jan 2019 17:50:36 +0000 (17:50 +0000)
commit8410fcb54ac808c19a030c6f0ec64e760ac64ca5
treeaab8d7db4d2e5f977d21337ef4dc09c17e421f67
parentd661611d080c833092b8a26a5a43d343e08dd404
docs/man: Fix/simplify generation of manpages

The original intent of this patch was to rename xen-vbd-interface.markdown.7
to xen-vbd-interface.pandoc.7 to remove the final markdown file from the docs/
tree.

The DOC_MANx lists are broken.  They contain MANxSRC-y twice, the first half
with a partial %.pod substituation, and the second half with a partial
%.markdown substitution.  This is also the root cause behind the filtering
activity in the uninstall-man$(i)-pages rule.

Furthermore, the logic for generating the manpage targets is unnecesserily
repetative, owing to the layout of source files in the man/ directory.

Therefore, tackle the problem by renaming all of our manpage source files from
"$FORMAT.$SECTION" to "$SECTION.$FORMAT".  For the two xl.cfg.5 and xl.1 which
are preprocessed by autoconf to contain path information, this requires
updating configure.ac and .gitignore.  The markdown to pandoc conversion is
performed as well, as it is also a straight rename.

An ancillary benefit of this renaming is that text editors stand a chance of
being able to work out the correct mode to use.

As for the makefile:

1) Break the MAN_SECTIONS list out of the GENERATE_MANPAGE_RULES loop, as we
   are going to use it a second time.
2) Do away with the individaul MANxSRC-y variables.  Use a single list,
   derived from all *.pod and *.pandoc files, with their format suffixes
   removed.
3) Use a $(foreach ...) to generate the DOC_MANx lists, filling them with the
   correct content.
4) The DOC_HTML and DOC_TXT can now include all manpages with a single
   substitution, as they don't need to separate the manpages by
   section-numbered-directory.
5) Fix up the filenames in the manpage metarule to match the renaming.

No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
46 files changed:
.gitignore
docs/Makefile
docs/configure
docs/configure.ac
docs/man/xen-pci-device-reservations.7.pod [new file with mode: 0644]
docs/man/xen-pci-device-reservations.pod.7 [deleted file]
docs/man/xen-pv-channel.7.pod [new file with mode: 0644]
docs/man/xen-pv-channel.pod.7 [deleted file]
docs/man/xen-tscmode.7.pod [new file with mode: 0644]
docs/man/xen-tscmode.pod.7 [deleted file]
docs/man/xen-vbd-interface.7.pandoc [new file with mode: 0644]
docs/man/xen-vbd-interface.markdown.7 [deleted file]
docs/man/xen-vtpm.7.pod [new file with mode: 0644]
docs/man/xen-vtpm.pod.7 [deleted file]
docs/man/xen-vtpmmgr.7.pod [new file with mode: 0644]
docs/man/xen-vtpmmgr.pod.7 [deleted file]
docs/man/xenstore-chmod.1.pod [new file with mode: 0644]
docs/man/xenstore-chmod.pod.1 [deleted file]
docs/man/xenstore-ls.1.pod [new file with mode: 0644]
docs/man/xenstore-ls.pod.1 [deleted file]
docs/man/xenstore-read.1.pod [new file with mode: 0644]
docs/man/xenstore-read.pod.1 [deleted file]
docs/man/xenstore-write.1.pod [new file with mode: 0644]
docs/man/xenstore-write.pod.1 [deleted file]
docs/man/xenstore.1.pod [new file with mode: 0644]
docs/man/xenstore.pod.1 [deleted file]
docs/man/xentop.1.pod [new file with mode: 0644]
docs/man/xentop.pod.1 [deleted file]
docs/man/xentrace.8.pod [new file with mode: 0644]
docs/man/xentrace.pod.8 [deleted file]
docs/man/xentrace_format.1.pod [new file with mode: 0644]
docs/man/xentrace_format.pod.1 [deleted file]
docs/man/xl-disk-configuration.5.pod [new file with mode: 0644]
docs/man/xl-disk-configuration.pod.5 [deleted file]
docs/man/xl-network-configuration.5.pod [new file with mode: 0644]
docs/man/xl-network-configuration.pod.5 [deleted file]
docs/man/xl-numa-placement.7.pod [new file with mode: 0644]
docs/man/xl-numa-placement.pod.7 [deleted file]
docs/man/xl.1.pod.in [new file with mode: 0644]
docs/man/xl.cfg.5.pod.in [new file with mode: 0644]
docs/man/xl.cfg.pod.5.in [deleted file]
docs/man/xl.conf.5.pod [new file with mode: 0644]
docs/man/xl.conf.pod.5 [deleted file]
docs/man/xl.pod.1.in [deleted file]
docs/man/xlcpupool.cfg.5.pod [new file with mode: 0644]
docs/man/xlcpupool.cfg.pod.5 [deleted file]